package mysql

import "gorm.io/gorm"

type Video struct {
	gorm.Model
	UserId int    `json:"userId" gorm:"type:int(10);not null;comment:'用户编号'"`
	Name   string `json:"name" gorm:"type:varchar(20);not null;comment:'视频名称'"`
	Time   string `json:"time" gorm:"type:varchar(100);not null;comment:'视频时长'"`
}

func (v *Video) Create() error {
	return DB.Model(&Video{}).Create(&v).Error
}
